home *** CD-ROM | disk | FTP | other *** search
- property ancestor
-
- on new me, tableName, castName, tableChannel, xLoc, vSlider, HSlider, descendant
- if objectp(descendant) then
- PassVar = descendant
- else
- PassVar = me
- end if
- ancestor = new(script("subtable object"), tableName, castName, tableChannel, xLoc, vSlider, HSlider, PassVar)
- return me
- end
-
- on GetScrollLeftIncrement me
- if IsTableVisible(me) then
- LeftCell = getMouseCell(me._me, me.pL + 2, me.pT + 2)
- NextLeftColumn = getAt(LeftCell, 1) - 1
- if NextLeftColumn = 0 then
- NextLeftColumn = 1
- end if
- return (getColumnWidth(member(me.pTable), NextLeftColumn) - 1) * (getSetting(me.pHSlider) - 1)
- end if
- end
-
- on GetScrollRightIncrement me
- if IsTableVisible(me) then
- if maxReached(me.pHSlider) then
- return me.pSpriteWidth
- else
- LeftCell = getMouseCell(me._me, me.pL + 2, me.pT + 2)
- return (getColumnWidth(member(me.pTable), getAt(LeftCell, 1)) - 1) * (getSetting(me.pHSlider) - 1)
- end if
- end if
- end
-
- on EvalSetTableMin me
- if IsTableVisible(me) then
- if getNumColumns(me) = 1 then
- setColumnWidth(member(me.pTable), 1, me.pMinRect.width)
- else
- SetTableMin(me)
- end if
- end if
- end
-
- on EvalSetTableMax me, xMax
- if IsTableVisible(me) then
- if getNumColumns(me) = 1 then
- setColumnWidth(member(me.pTable), 1, xMax - me.pL)
- else
- SetTableMax(me, xMax)
- end if
- end if
- end
-
- on scrollLeft me, HScrollIncrement
- if IsTableVisible(me) then
- sprite(me.pTableChannel).hScroll = HScrollIncrement
- end if
- return me
- end
-
- on scrollRight me, HScrollIncrement
- if IsTableVisible(me) then
- sprite(me.pTableChannel).hScroll = HScrollIncrement
- end if
- return me
- end
-
- on CalcCenterofRect me, xRect
- if the machineType = 256 then
- l = getAt(xRect, 1)
- t = getAt(xRect, 2)
- R = getAt(xRect, 3)
- b = getAt(xRect, 4)
- xCenter = (R - l) / 2
- if ((l mod 2) = 1) and ((R mod 2) = 1) then
- xCenter = xCenter - 1
- end if
- if ((l mod 2) = 0) and ((R mod 2) = 0) then
- xCenter = xCenter - 1
- end if
- if ((l mod 2) = 1) and ((R mod 2) = 0) then
- xCenter = xCenter - 1
- end if
- yCenter = (b - t) / 2
- if ((t mod 2) = 0) and ((b mod 2) = 0) then
- yCenter = yCenter - 1
- end if
- xPoint = point(l + xCenter, t + yCenter)
- else
- xPoint = RectToLoc(xRect)
- end if
- return xPoint
- end
-